home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3495 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1.8 KB  |  64 lines

  1. Path: news.MWCI.NET!usenet
  2. From: stuffle@pcii.net
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: ini files under MSVC 1.52 link problem
  5. Date: 24 Jan 1996 12:54:42 GMT
  6. Organization: MidWest Communications, Inc.
  7. Message-ID: <4e5a6i$hr1@hihat.mwci.net>
  8. References: <4e2lu9$168@snlsu1>
  9. Reply-To: stuffle@pcii.net
  10. NNTP-Posting-Host: lan-pm1-12.pcii.net
  11. X-Newsreader: IBM NewsReader/2 v1.2.5
  12.  
  13. In <4e2lu9$168@snlsu1>, Laurent Darton <darton@macon.wm.slb.com> writes:
  14. >hi all,
  15. >I would like to write in a private ini file under windows..
  16.  
  17. Then this should probably be in a comp.os.windows.* group.
  18.  
  19. >here is what I've done
  20. >
  21. >#include <windows.h>
  22. >
  23. >void main(void)
  24. >{
  25. >BOOL  fSuccess;
  26. >fSuccess=WritePrivateProfileString("MyApp","LastFile","testcode.c","testc
  27. >ode.ini");
  28. >}
  29. >
  30.  
  31. Looks good so far.
  32.  
  33. >I have a problem with link :
  34. >MAIN.OBJ(r:\mbus\tsr\global\ini\main.cpp) : error L2029: 
  35. >'WRITEPRIVATEPROFILESTRING' : unresolved external
  36. >
  37. >I think it 's a problem with uppercase letters...
  38. >but I don't know how to solve it.
  39. >Rem : I need to make a dos application not under windows..
  40.  
  41. PROBLEM:  WritePrivateProfileString is a Windows API call.  Therefore,
  42. you can only use it in Windows programs.  Unless there is already a 
  43. 3rd party tool out there, you will probably have to create your own
  44. ini file parser or make a Windoze app instead of a DOS app.
  45.  
  46. >Any help will be welcom..
  47. >Thanks in advance
  48. >Laurent
  49. >
  50. >
  51.  
  52. HTH
  53.  
  54.  
  55.                                 \\\|///
  56.                                 | ~ ~ |
  57.                                (- @ @ -)
  58. //------------------------oOOo----(_)----oOOo------------------------
  59. //  Ken Sodemann  (Stuffle)             |   Life is a lot easier
  60. //  Stuffle@PCII.NET                    |   when you are 
  61. //  http://users.mwci.net/~stuffle/     |   Warped!!
  62. //-------------------------------------------------------------------
  63.  
  64.